﻿@model IEnumerable<Core.Models.MainMenu>
@{
    bool IsSmallDevice = (bool)Session["IsSmallDevice"];
}

<ul>
@{
    foreach(Core.Models.MainMenu item in Model)
    {
        if(item.UserPermission == "Can Use Anonymously" || Core.UserPermissions.HasPermission(item.UserPermission))
        {
            if(item.URL == Session["URL"].ToString())
            {
                <li class="current"><a href="@item.URL" ><b>@item.Name</b></a></li>
            }
            else
            {
                if((!IsSmallDevice) || (!item.HideOnSmallDevice))
                {
                <li><a href="@item.URL" ><b>@item.Name</b></a></li>
                }
            }
        }
    }
}
</ul>
